﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Citrix.Cmp;
using System.Windows;
using System.Windows.Threading;

namespace Citrix.XaAdminMobile.ViewModel
{
    /// <summary>
    /// The v-m class used to display a popup using PopupWindow.
    /// </summary>
    internal class PopupViewModel
    {
        /// <summary>
        /// The list of popup items.
        /// </summary>
        private List<object> popupItems;

        /// <summary>
        /// Ctor
        /// </summary>
        public PopupViewModel()
        {
            this.popupItems = new List<object>();
        }

        /// <summary>
        /// Add a button to the popup. Elements are displayed in the order you add them.
        /// </summary>
        /// <param name="button">The button to add.</param>
        public void AddButton(PopupButtonViewModel button)
        {
            if (null != button)
            {
                this.popupItems.Add(button);
            }
        }

        /// <summary>
        /// Adds a message to the popup. Elements are display in the order you add them.
        /// </summary>
        /// <param name="message">The message to add.</param>
        public void AddMessage(PopupMessageViewModel message)
        {
            if (null != message)
            {
                this.popupItems.Add(message);
            }
        }

        /// <summary>
        /// The list of popup items.
        /// </summary>
        public List<object> PopupItems
        {
            get
            {
                return new List<object>(this.popupItems);
            }
        }
    }
}
